<template>
  <div>
    <h1>Count:{{count}}</h1>
    <button @click="add">累加</button>
  </div>
</template>

<script>
export default {
  name: "Gege",
  data(){
    return{
      count:0
    }
  },
  methods:{
    add(){
      this.count ++
      this.$bus.$emit("count",this.count)
    }
  }
}
</script>

<style scoped>

</style>